package com.yl.chainStore.mapper.warehouse;

import com.yl.chainStore.entity.warehouse.WarehouseOutOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.yl.chainStore.common.enums.Status
import com.yl.chainStore.entity.warehouse.WarehouseInOrder
import com.yl.chainStore.pojo.vo.warehouse.WarehouseOutOrderSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 出库单 Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-06-10
 */
@Mapper
interface WarehouseOutOrderMapper : BaseMapper<WarehouseOutOrder> {

    /**
     * 出库单分页
     */
    fun selectOutOrderPage(
        @Param("page") page: Page<WarehouseOutOrder>,
        @Param("order") order: WarehouseOutOrderSelectVo,
        @Param("stagingStatus")status: Status
    ): Page<WarehouseOutOrder>

    /**
     * 出库单
     */
    fun getOutOrderById(id:Long):WarehouseOutOrder?

    /**
     * 某人，某个部门的暂存出库单
     */
    fun getUserStagingOutOrder(@Param("userId")userId:Long,
                              @Param("warehouseId")warehouseId:Long,
                              @Param("status")status: Status
    ):List<WarehouseOutOrder>

}
